package com.spring.takeaway.controller;

import com.spring.takeaway.po.User;
import com.spring.takeaway.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.math.BigInteger;

/**
 * @Author LCD
 * @Date 2022/6/13 23:10
 **/

@RestController
public class UserController {


    @Autowired
    private UserService userService;


    @GetMapping("/getUser/{phone}/{password}")
    public User findUser(@PathVariable String phone,@PathVariable String password){
        return this.userService.findUserByPhone(phone,password);
    }


    //修改密码
    @GetMapping("/update/{phone}/{pwd}")
    public int updatepwd(@PathVariable String phone,@PathVariable String pwd){
        return this.userService.UpdatePwd(phone,pwd);
    }

}
